<!--
 * @Descripttion: 核酸宝项目前端
 * @version: 
 * @Author: 杜宇轩
 * @Date: 2022-05-11 21:42:49
 * @LastEditors: 杜宇轩
 * @LastEditTime: 2022-05-22 06:21:26
-->
<template>
  <div class="noticeDetail_box">
    <el-page-header
      class="noticeDetail_goBack"
      @back="$router.go(-1)"
    />
    <div class="noticeDetail_title">{{ currentNotice.title }}</div>
    <div class="noticeDetail_time">发布时间：{{ currentNotice.publishTime }}</div>
    <div class="noticeDetail_notice">{{ currentNotice.notice }}</div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      currentNotice: {}
    }
  },
  created() {
    this.initNotice();
  },
  methods: {
    initNotice() {
      this.currentNotice = this.$store.getters['commonUser/getCurrentNotice'];
      if (!this.currentNotice.title) {
        this.$router.go(-1);
      }
    }
  }
}
</script>

<style lang="scss">
.noticeDetail_box {
  background: #FFFFFF;
  margin: 50px 10% 0px 10%;
  width: 80%;
  min-height: 700px;

  .noticeDetail_goBack {
    padding: 10px 0px 0px 10px;
  }

  .noticeDetail_title {
    width: 90%;
    text-align: center;
    font-size: 24px;
    margin: 20px auto 0px auto;
    border-bottom: 5px solid rgb(233, 233, 233);
  }

  .noticeDetail_time {
    height: 50px;
    line-height: 50px;
    text-align: center;
    font-size: 14px;
    color: #8C8C8C;
  }

  .noticeDetail_notice {
    width: 90%;
    margin: 50px auto 0px auto;
  }
}

</style>
